package com.newhis.pattern.chain;

/**
 * 业务聚合
 *
 * @version [V2.0]
 * @package com.newhis.newhisbase.pattern.chain;
 * @description:[用一句话描述该文件做什么]
 * @author: [zhuben]
 * @date: [2024-07-14 13:23]
 * @copyright: 2024 echovin.com
 */

public class InfoLogger extends AbstractLogger{
    private static volatile InfoLogger infoLogger;
    private InfoLogger(){}
    private InfoLogger(int level) {
        this.level = level;
        setNext(ErrorLogger.getInstance());
    }

    public static InfoLogger getInstance(){
        if (infoLogger == null){
            synchronized (InfoLogger.class){
                if (infoLogger == null){
                    infoLogger = new InfoLogger(2);
                }
            }
        }
        return infoLogger;
    }


    @Override
    void write(String message) {
        System.out.println(message);
    }
}